import {RouteObject,  createHashRouter} from 'react-router-dom'
import Ab from '../view/page/yezhu/xiaobao/xb';
import Index from '../view/page/login';
import Schg from '../view/page/yezhu/schg/schg'
import Schgserver from "../view/page/yezhu/schg/server"
import Home from '../view/page/layout';
import Logout from '../view/page/logout'
import Err from '../view/page/err'
import Fschg from '../view/page/yezhu/schg/fschg';
export const route:RouteObject[]= [
 


    {
        path:"/home",
        element:<Home></Home>,
        children:[
            {
                path:"xb",
                element:<Ab></Ab>
            }, 
            {
                path:"schgs",
                element: <Schgserver></Schgserver>
            },
            {
                path:"schg",
                element:<Schg></Schg>
            },
            {
                path:'/home/logout',
                element:<Logout></Logout>
            }
            
        ]
    },
    //给用户看的地址
    {
        path:"/xb",
        element:<Ab></Ab>,
      
    },
    {
         
        path:"/fschg",
        element:<Fschg></Fschg>,
   
      
    },
    
    
    
    {
        path:'/',
        element:<Index></Index>
    },
    
   {


    path:"/err",
    element:<Err></Err>
   },


    {
        path:'*',
        element:<div>404</div>
    }
    
    
]

const router =createHashRouter(route)



export default router